package com.ruoyi.hotel.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hotel.mapper.HlRoomPriceMapper;
import com.ruoyi.hotel.domain.HlRoomPrice;
import com.ruoyi.hotel.service.IHlRoomPriceService;

/**
 * 房间计费Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlRoomPriceServiceImpl implements IHlRoomPriceService 
{
    @Autowired
    private HlRoomPriceMapper hlRoomPriceMapper;

    /**
     * 查询房间计费
     * 
     * @param id 房间计费主键
     * @return 房间计费
     */
    @Override
    public HlRoomPrice selectHlRoomPriceById(Integer id)
    {
        return hlRoomPriceMapper.selectHlRoomPriceById(id);
    }

    /**
     * 查询房间计费列表
     * 
     * @param hlRoomPrice 房间计费
     * @return 房间计费
     */
    @Override
    public List<HlRoomPrice> selectHlRoomPriceList(HlRoomPrice hlRoomPrice)
    {
        return hlRoomPriceMapper.selectHlRoomPriceList(hlRoomPrice);
    }

    /**
     * 新增房间计费
     * 
     * @param hlRoomPrice 房间计费
     * @return 结果
     */
    @Override
    public int insertHlRoomPrice(HlRoomPrice hlRoomPrice)
    {
        hlRoomPrice.setCreateTime(DateUtils.getNowDate());
        return hlRoomPriceMapper.insertHlRoomPrice(hlRoomPrice);
    }

    /**
     * 修改房间计费
     * 
     * @param hlRoomPrice 房间计费
     * @return 结果
     */
    @Override
    public int updateHlRoomPrice(HlRoomPrice hlRoomPrice)
    {
        hlRoomPrice.setUpdateTime(DateUtils.getNowDate());
        return hlRoomPriceMapper.updateHlRoomPrice(hlRoomPrice);
    }

    /**
     * 批量删除房间计费
     * 
     * @param ids 需要删除的房间计费主键
     * @return 结果
     */
    @Override
    public int deleteHlRoomPriceByIds(Long[] ids)
    {
        return hlRoomPriceMapper.deleteHlRoomPriceByIds(ids);
    }

    /**
     * 删除房间计费信息
     * 
     * @param id 房间计费主键
     * @return 结果
     */
    @Override
    public int deleteHlRoomPriceById(Long id)
    {
        return hlRoomPriceMapper.deleteHlRoomPriceById(id);
    }
}
